package com.cf.user.login;

import com.cf.expire.DefaultExpireService;
import com.cf.expire.ExpireService;
import com.cf.user.core.part.wx.WxUserService;
import com.cf.user.login.service.*;
import lombok.extern.slf4j.Slf4j;
import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
import org.springframework.context.annotation.Bean;

/**
 * boot-awm-BaseConfig
 *
 * @author <a href="2428922347@qq.com">Zhu mingming</a>
 * @info
 * @since 2018/6/27 下午 04:33
 */
@Slf4j
public class BaseConfig {

//    @Bean
//    @ConditionalOnMissingBean(TokenManager.class)
//    public TokenManager tokenManager() {
//        log.info("未找到自定义的TokenManager，实例化默认的DefaultTokenManagerImpl");
//        return new DefaultTokenManagerImpl();
//    }
//
//    //#####################用户########################################
//    @Bean
//    @ConditionalOnMissingBean(UserInfoService.class)
//    public UserInfoService userInfoService() {
//        log.info("未找到自定义的UserInfoService，实例化默认的DefaultUserInfoService");
//        return new UserInfoServiceImpl();
//    }
//
//    @Bean
//    @ConditionalOnMissingBean(UserPartService.class)
//    public UserPartService userPartService() {
//        log.info("未找到自定义的UserPartService，实例化默认的ThirdPartUserServiceImpl");
//        return new ThirdPartUserServiceImpl();
//    }
//
//    //########################第三方登陆##########################
//    @Bean
//    @ConditionalOnMissingBean(WxUserService.class)
//    public WxUserService wxUserService() {
//        log.info("未找到自定义的WxUserService，实例化默认的WxUserService");
//        return new WxUserService();
//    }
//
//    @Bean
//    @ConditionalOnMissingBean(ExpireService.class)
//    public ExpireService expireService() {
//        log.info("未找到自定义的ExpireService，实例化默认的DefaultExpireService");
//        return new DefaultExpireService();
//    }


}
